Problem Note 31193: Mulitple line plots that use summarized data and a group-by variable might return an error
Both SAS® Enterprise Guide® and the SAS® Add-in for Microsoft Office enable you to create a type of line plot called Multiple line plots by group column. If you define the line plot with the following settings, an error might occur when you run the task.
- a variable is assigned to the optional Group charts by role
- the option Summarize for each distinct horizontal val is selected for the Vertical role, and the Function is set to Sum.
This is the error:
ERROR: Data set WORK.SORTTEMPTABLESORTED is not sorted in ascending sequence.
The current by-group has groupvar = VALUE2 and the next by-group has groupvar = VALUE1.
This error occurs because the PROC SQL that creates the summarized data places the group by and order
by variables in the wrong order. To circumvent this problem, you can modify the generated code. Here are the steps:
- In the Line Plot task window, assign your variables to desired task roles, and specify any other options for the plot.
- Click Preview Code at the bottom of the window.
- In the Code Preview for Task window, scroll down until you get to the
TITLE;
statement. Highlight and copy all of the code from the TITLE;
statement down to and including the QUIT;
statement.
- Click Insert Code at the top of the window.
- In the User Code window, scroll down to the
TITLE;
statement. Just above the statement, double click the shaded line: <Double-click to insert code
>.
- In the Enter User Code window, type
/*
, and then click OK.
- In the User Code window, scroll down the code to the
QUIT;
statement. Just below the statement, double click the shaded line: <Double-click to insert code
>.
- In the Enter User Code window, type
*/
and then paste the code that you copied in step 3.
- In the pasted code, change the variables on the GROUP BY and ORDER BY statements so that they are in the following order:
- the variable that you assigned to the Group charts by task role
- the variable that you assigned to the Group task role
- the variable that you assigned to the Horizontal axis task role
For example:
GROUP BY Group-byvar, Groupvar, Horizontalvar
ORDER BY Group-byvar, Groupvar, Horizontalvar
|
- Click OK to close the Enter User Code window.
- Click OK to close the User Code window.
- Click X in the upper, right-hand corner of the Preview Code window.
Operating System and Release Information
SAS System | SAS Add-in for Microsoft Office | Microsoft® Windows® for x64 | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise Edition | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Datacenter Edition | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Professional | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Standard Edition | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Server | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows XP Professional | 2.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Datacenter Server | 2.1 | 4.2 | | 9.2 TS2M0 |
SAS System | SAS Enterprise Guide | Microsoft Windows XP Professional | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Server | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Professional | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Standard Edition | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise Edition | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows Server 2003 Datacenter Edition | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 4.1 | 4.2 | | 9.2 TS2M0 |
Microsoft Windows 2000 Datacenter Server | 4.1 | 4.2 | | 9.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2008-02-29 12:30:28 |
Date Created: | 2008-02-14 11:24:18 |